<template>
  <!-- 正文区域 -->
  <div>
    <ind-header />
    <div class="k">
      <div class="title">
        <h3>{{ article.title }}</h3>
        <p class="time">发布时间：{{ article.arttime }}</p>
      </div>
      <div class="article-content" v-html="article.content"></div>
    </div>
  </div>
</template>

<script>
import IndHeader from "@/components/IndHeader.vue";
import { articleDetailServe } from "@/utils/service/user";
export default {
  components: { IndHeader },
  data() {
    return {
      article: [], //绑定文章对象信息
    };
  },
  async mounted() {
    let artid = this.$route.query.artid;
    let res = await articleDetailServe(artid);
    this.article = res.data;
  },
};
</script>

<style lang="scss" scoped>
.k {
  width: 1440px;
  margin: 0 auto;
  .title {
    margin: 20px auto;
    width: 100%;
    > h3 {
      font-size: 34px;
      text-align: center;
      margin-bottom: 10px;
    }
    > p {
      font-size: 14px;
      text-align: center;
    }
  }
}
</style>
<style lang="scss">
.article-content {
  width: 1000px;
  margin: 0 auto;
  padding-top: 10px;
  > h3 {
    font-size: 26px;
    padding: 8px;
  }
  > h4 {
    font-size: 22px;
    padding: 6px;
  }
  > p {
    text-indent: 2em;
    font-size: 18px;
    color: #333;
    line-height: 30px;
  }
}
</style>
